/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cronus.server;

//Imports Database connectie
import java.io.IOException;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Jannick
 */
public class CronusServer {
    
    //Attributen
    //Database
    private final String URL = "jdbc:sqlserver://localhost;databaseName=Navision;integratedSecurity=true;";
    public Connection connection;
    private Statement statement;
    private ResultSet rs;
    private Main main;
    //Socketconnection
    public SocketConnection socketconnection;
    
    //Constructor -test comment
    public CronusServer( Main main ){
        this.main = main;
        //Start socket connectie
        socketconnection = new SocketConnection( main );
        socketconnection.handleConnection();
    }
    
    //Methoden
   
    //Query uitvoeren op database
    public void executeQuery(String query){
        try {
            statement = connection.createStatement();
            rs = statement.executeQuery(query);
            String result = "";
            while (rs.next()) {
                
            }
            
            rs.close();
            statement.close();
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }
}
